hackerrank special string again problem solution

visit shbcf.ru